#ifndef VERTEX_H
#define VERTEX_H

#include <cmath>
#include <iostream>

using namespace std;

struct Vertex{
    float x, y, z;
	Vertex();	
	float length();	
};
bool operator==(Vertex v1, Vertex v2);

istream & operator >> (istream& is, Vertex & v);

Vertex diff(Vertex v1, Vertex v2);

float dist(Vertex v1, Vertex v2);

float dot_product(Vertex v1, Vertex v2);


struct Line{
	float a, b, c;
	Line(float x, float y, float z): a(x), b(y), c(z){}
	Line(float x1, float y1, float x2, float y2);
};

Vertex project_point(Vertex v, Line l);
Vertex lines_intersection(Line l1, Line l2);

struct LineSegment{
	Vertex v1, v2;
};

bool parallel(Line l1, Line l2);
bool point_on_lineseg(Vertex v, Vertex v1, Vertex v2);
bool point_on_line(Vertex v, Vertex v1, Vertex v2);


#endif